package exceptions;

public class DBException extends Exception {
	Exception prev = null  ;
	
	public DBException () {
		super() ; 
	}
	
	public DBException ( Exception e , String reason ) {
		super ( reason ) ; 
		prev = e ;
	}
	
	public void printStackTrace () {
		if ( prev == null ) super.printStackTrace() ; // the lowwest level of exception
		else {
			System.out.println ( super.toString() ) ;
			prev.printStackTrace() ; 
		}
	}
	
}
